unit ConstBufferUnit;

interface
type
  ConstBufferClass = class(TObject)
  private
    { Private declarations }
    Name : String;
    mType : String;
    mNumregisters : Integer;
    data : String;
  public
    (**
        The interface functions (Setters and Getters)
    *)
    procedure set_Name(Nam : String);
    procedure set_Type(typ : String);
    procedure set_mNumregisters(num : Integer);
    procedure set_data(d : String);

    function get_Name():String;
    function get_Type():String;
    function get_mNumregisters():Integer;
    function get_data():String;
    // The constructor
    Constructor Create(Nam, typ : string; numOfRegisters : Integer; d : String); overload;
  end;

implementation

procedure ConstBufferClass.set_Name(Nam : String);
begin
name := Nam;
end;

procedure ConstBufferClass.set_Type(typ : String);
begin
mType := typ;
end;

procedure ConstBufferClass.set_mNumregisters(num : Integer);
begin
mNumregisters := num;
end;

procedure ConstBufferClass.set_data(d : String);
begin
Data := d;
end;

function ConstBufferClass.get_Name():String;
begin
result := name;
end;

function ConstBufferClass.get_Type():String;
begin
result := mType;
end;

function ConstBufferClass.get_mNumregisters():Integer;
begin
result := mNumregisters;
end;

function ConstBufferClass.get_data() : String;
begin
result := data;
end;

Constructor ConstBufferClass.Create(Nam, typ : string; numOfRegisters : Integer; d : String);
begin
set_Name(nam);
set_Type(typ);
set_mNumregisters(numOfRegisters);
set_data(d);
end;
    
end.
